package org.NooLab.glue.components.pkg;

import java.io.IOException;
import java.io.InputStream;

import org.NooLab.glue.net.ftp.FtpBox;
import org.NooLab.utilities.files.DFutils;

public class DataDeliveryPackage implements DataDeliveryPackageIntf {

	String username="" ;
	String password="" ;
	
	String targetAddress = "";
	int targetPort = 0;
	
	String storFilename = "" ;
	
	InputStream dataAsInputStream ;
	 
	DFutils fileutil = new DFutils() ;
	
	
	
	public DataDeliveryPackage( ){
	}

	public void clearData(){
		
		try {
			if (dataAsInputStream != null) {

				dataAsInputStream.reset();

			}
		} catch (IOException e) {}
		
		dataAsInputStream = null;
	}
	
	// ------------------------------------------------------------------------


	public String getUsername() {
		return username;
	}

 
	public void setUsername(String username) {
		this.username = username;
	}

 
	public String getPassword() {
		return password;
	}
 

	public void setPassword(String password) {
		this.password = password;
	}



	public String getTargetAddress() {
		return targetAddress;
	}
 

	public void setTargetAddress(String targetAddress) {
		this.targetAddress = targetAddress;
	}
 

	public int getTargetPort() {
		return targetPort;
	}

  
	public void setTargetPort(int targetPort) {
		this.targetPort = targetPort;
	}

	public String getStorFilename() {
		return storFilename;
	}

	public void setStorFilename(String filename) {
		
		this.storFilename = fileutil.getSimpleName(filename);
 	}

	public InputStream getDataAsInputStream() {
		return dataAsInputStream;
	}

	public void setDataAsInputStream(InputStream dataAsInputStream) {
		this.dataAsInputStream = dataAsInputStream;
	}
	
	
	
	
}
